package com.cskaoyan.day03.stack;

/**
 * @author stone
 * @date 2022/01/29 14:59
 */
public class LinkedStackDemo {

    public static void main(String[] args) {
        LinkedStack<String> stack = new LinkedStack<>();
        stack.push("红");
        stack.push("橙");
        stack.push("黄");
        stack.push("绿");

        System.out.println(stack.pop());
        System.out.println(stack.pop());
        System.out.println(stack.pop());
        System.out.println(stack.pop());
        //System.out.println(stack.pop());

        //练习 字符串反转 → 作业 Character  String chatAt
        String target = "hello";
        for (int i = 0; i < target.length(); i++) {
            char x = target.charAt(i);
        }

    }
}
